package org.example.demo;

import org.example.dao.BookDao;
import org.example.dao.UsersDao;
import org.example.model.Users;

import java.util.List;
import java.util.Scanner;

public class demo9_SelectUsersList {
    public static void main(String[] args) {
        System.out.println("请输入分类名");
        Scanner scanner = new Scanner(System.in);
        String category = scanner.next();
        //调用dao获取结果
        BookDao bookDao = new BookDao();
        List<Users> list = bookDao.selectByBookCategory(category);
        if (list == null){
            System.out.println("没有查询到结果");
            return;
        }
        for (Users users : list) {
            System.out.println(users.toString());
        }
    }
}























